#define _CRT_SECURE_NO_WARNINGS 1

#include"seqlist.h"

void test() {
	SeqList list = { 0 };
	SeqListInit(&list);
	SeqListPushFront(&list, 3);
	SeqListPushBack(&list, 2);
	SeqListPushFront(&list, 1);
	SeqListPushFront(&list, 4);
	SeqListPushFront(&list, 5);
	SeqListPrint(&list);
	SeqListPopFront(&list);
	SeqListPopFront(&list);
	SeqListPopFront(&list);
	SeqListPopFront(&list);
	SeqListPrint(&list);
}

void test2() {
	SeqList list = { 0 };
	SeqListInit(&list);
	SeqListPushFront(&list, 3);
	SeqListPushBack(&list, 2);
	SeqListPushFront(&list, 1);
	SeqListPushFront(&list, 4);
	SeqListPushFront(&list, 5);
	SeqListPrint(&list);
	SeqListPopBack(&list);
	SeqListPrint(&list);
	SeqListPopBack(&list);
	SeqListPrint(&list);
	SeqListPopBack(&list);
	SeqListPrint(&list);
	SeqListPopBack(&list);
	SeqListPrint(&list);
}

void test3() {
	SeqList list = { 0 };
	SeqListInit(&list);
	SeqListPushFront(&list, 3);
	SeqListPushBack(&list, 2);
	SeqListPushFront(&list, 1);
	SeqListPushFront(&list, 4);
	SeqListPushFront(&list, 5);
	SeqListPrint(&list);
	int pos = SeqListFind(&list, 4);
	SeqListInsert(&list, pos, 40);
	SeqListPrint(&list);
	pos = SeqListFind(&list, 1);
	SeqListErase(&list, pos);
	SeqListPrint(&list);
}

int main() {
	test3();
	return 0;
}